package com.coderman.infosys.auth.app.convert;

import java.util.List;

import com.coderman.infosys.auth.api.dto.role.RoleDTO;
import com.coderman.infosys.auth.api.dto.role.RoleGroupDTO;
import com.coderman.infosys.auth.api.dto.role.request.CreateRoleGroupRequestDTO;
import com.coderman.infosys.auth.api.dto.role.request.UpdateRoleGroupRequestDTO;
import com.coderman.infosys.auth.domain.bo.role.RoleGroupBO;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
* @Description:RoleGroupConvert接口
* @Author:
* @CreateTime:2022-01-02 15:27:39
* @version v1.0
*/
@Mapper
public interface RoleGroupConvert extends BaseConvert{
	RoleGroupConvert INSTANCE = Mappers.getMapper(RoleGroupConvert.class);

	/**
	 *
	 * @Description:
	 * @return List<RoleGroupBO>
	 */
	 List<RoleGroupBO> roleDTOs2boList(List<RoleDTO> roleDTOList);
	/**
	 *
	 * @Description:
	 * @return RoleGroupBO
	 */
	@Mapping(target = "roleList", expression
			= "java(buildFromListStr(updateRoleGroupRequestDTO.getRoleCodeList()))")
	 RoleGroupBO dto2bo(UpdateRoleGroupRequestDTO updateRoleGroupRequestDTO);

	/**
	 *
	 * @Description:
	 * @return List<RoleGroupBO>
	 */
	 List<RoleGroupBO> updateRoleGroupRequestDTOs2boList(List<UpdateRoleGroupRequestDTO> updateRoleGroupRequestDTOList);
	/**
	 *
	 * @Description:
	 * @return RoleGroupBO
	 */

	 RoleGroupBO dto2bo(CreateRoleGroupRequestDTO createRoleGroupRequestDTO);
	/**
	 *
	 * @Description:
	 * @return List<RoleGroupBO>
	 */
	 List<RoleGroupBO> createRoleGroupRequestDTOs2boList(List<CreateRoleGroupRequestDTO> createRoleGroupRequestDTOList);
	/**
	 *
	 * @Description:
	 * @return RoleDTO
	 */
	 RoleDTO bo2dto(RoleGroupBO roleGroupBO);
	/**
	 *
	 * @Description:
	 * @return RoleGroupBO
	 */
	 RoleGroupBO dto2bo(RoleDTO roleDTO);

	/**
	 *
	 * @Description:
	 * @return RoleDTO
	 */
	RoleGroupDTO bO2dto(RoleGroupBO roleGroupBO);


	/**
	 *
	 * @Description:
	 * @return List<RoleGroupDTO>
	 */
	List<RoleGroupDTO> roleBOs2dtOList(List<RoleGroupBO> roleGroupBOList);

}